package com.hskn.hss.module.alarmcar.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hskn.hss.utils.Tools;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AlarmCarFull implements Serializable {

    private static final long serialVersionUID = 1L;

    private String carName;

    private String depName;
    private String depId;

    private String carTypeName;
    private String alarmTypeName;

    private Integer shopCount;

    /**
     * 停留时长
     */
    private String timeLength;

    public String getTimeLength() {
        return Tools.secondToTime(new BigDecimal(timeLength).divide(new BigDecimal(1),2,BigDecimal.ROUND_HALF_UP).longValue());
    }

    public AlarmCarFull() {
    }
}
